Alliteration is a literary device that involves the repetition of initial consonant sounds in neighboring words or syllables, often used for emphasis or to create rhythm in writing or speech. Examples include "Peter Piper picked a peck of pickled peppers" and "she sells seashells by the seashore."